import { nextTick, Ref } from '@vue/composition-api';
import BetterScroll from '@better-scroll/core'
// 刷新betterScroll-->当内容重新加载时使用
export default function (bS: Ref<BetterScroll | null> | BetterScroll) {
    nextTick(() => {
        if ('value' in bS) {
            if ('refresh' in bS.value) bS.value.refresh();
        } else {
            bS.refresh();
        }
    });
    return bS;
}
